﻿Imports BLL

Public Class ThemDichVu
    Dim dsdichvu As IList
    Public ds_dichVu As New List(Of DichVu)
    Private Sub ThemDichVu_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim dichvubus As New DichVu_BLL

        dsdichvu = dichvubus.LayDanhSach()
        gridDichVu.DataSource = dsdichvu
    End Sub

    Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click
        Me.Close()
    End Sub

    Private Sub btnThem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThem.Click
        Try
            Dim n As Integer = gridDichVu.CurrentCell.RowIndex
            ds_dichVu.Add(dsdichvu.Item(n))
            MessageBox.Show("Thêm thành công !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        Catch ex As Exception
            MessageBox.Show("Thêm thất bại !" + vbNewLine + ex.Message, "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
        End Try
    End Sub
End Class